Skip to content

compiler tests: positive-control set for declaration parser (16->21). Closes #1130#1133

Merged
gHashTag merged 1 commit into
masterfrom
loop9-t-decl-positive-tests
Jun 14, 2026
Merged

compiler tests: positive-control set for declaration parser (16->21). Closes #1130#1133
gHashTag merged 1 commit into
masterfrom
loop9-t-decl-positive-tests

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Summary

Add a positive-control test set to mod tests_compiler_rejects in
bootstrap/src/compiler.rs: where the existing negative tests (added in #1123 / variant Q)
pin what the declaration parser rejects and drops, these pin what it accepts and lowers.
Pure test additions; no production code changes.

Motivation

After #1123 we have good coverage of rejection/recovery behavior at the declaration level,
but the acceptance side is comparatively under-pinned. A regression that silently stopped
lowering a valid construct (a const, an fn body, a struct) would not be caught by the
negative tests alone. This adds the mirror set so both directions are locked in.

Following the project rule, each test was written by empirically observing the current
behavior first, then asserting it -- the new tests characterize today's behavior, they do
not endorse or prescribe it.

New tests (5)

  • accepts_multiple_consts -- two consts (A=7, B=9) both lower.
  • accepts_fn_with_body -- a function with a body (id=x) lowers.
  • accepts_mixed_const_and_fn -- a const plus a function both lower.
  • accepts_struct_declaration -- a struct declaration lowers (its name appears in output,
    no TODO marker emitted).
  • lowers_only_first_of_two_modules_characterization -- with two modules, only the FIRST is
    lowered (emitted module count == 1; the second module's symbols are absent). This is a
    characterization of current behavior, explicitly named as such.

Verification

  • tests_compiler_rejects count: 16 -> 21.
  • Full suite: 1463 passed, 0 failed, 0 regressions.

L6 gf16 SSOT untouched; catalog stays 83; no gen/ edits; ASCII-only added lines; no quality
claim added.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-06-14 17:32:34 UTC

Summary

Status Count
Total Open PRs 2
PRs with Failing Checks 0
PRs with All Checks Green 2
READY 1
FAILING 0
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=8c6db9fe77c2 != manifest seal=49e55df6d444.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@gHashTag
gHashTag merged commit 5780fb9 into master Jun 14, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant